import request from '@/config/axios'

// 项目需求版本管理表单 VO
export interface RequireVersionManagementVO {
  id: number // 自增主键
  requirementId: string // 关联需求编号
  versionNumber: string // 需求版本号
  versionDescription: string // 版本描述信息
  versionCreationTime: Date // 版本创建时间
  versionCreator: string // 版本创建用户
}

// 项目需求版本管理表单 API
export const RequireVersionManagementApi = {
  // 查询项目需求版本管理表单分页
  getRequireVersionManagementPage: async (params: any) => {
    return await request.get({ url: `/project/require-version-management/page`, params })
  },

  // 查询项目需求版本管理表单详情
  getRequireVersionManagement: async (id: number) => {
    return await request.get({ url: `/project/require-version-management/get?id=` + id })
  },

  // 新增项目需求版本管理表单
  createRequireVersionManagement: async (data: RequireVersionManagementVO) => {
    return await request.post({ url: `/project/require-version-management/create`, data })
  },

  // 修改项目需求版本管理表单
  updateRequireVersionManagement: async (data: RequireVersionManagementVO) => {
    return await request.put({ url: `/project/require-version-management/update`, data })
  },

  // 删除项目需求版本管理表单
  deleteRequireVersionManagement: async (id: number) => {
    return await request.delete({ url: `/project/require-version-management/delete?id=` + id })
  },

  // 导出项目需求版本管理表单 Excel
  exportRequireVersionManagement: async (params) => {
    return await request.download({ url: `/project/require-version-management/export-excel`, params })
  },
}